import {customeStruct} from '../utils';

const itf = customeStruct.interface;

export const InitData = itf({
    payload: itf({
        brands: [itf(Object.assign({
            id: 'string',
            code: 'string',
            name: 'string',
        }))],
    })
});

export const ListData = itf({
    payload: itf({
        content: [itf({
            id: 'string',
            dealerCode: 'string',
            partContractInvoiceCode: 'string',
            code: 'string',
            status: 'number',
            rowVersion: 'string',
            options: 'array',
        })],
        totalElements: 'number'
    })
});

export const Detail = itf({
    payload: itf({
        id: 'string',
        dealerCode: 'string',
        partContractInvoiceCode: 'string',
        code: 'string',
        status: 'number',
        rowVersion: 'string',
        options: 'array',
    })
});
const dealer = {
    id: 'string',
    code: 'string',
    name: 'string'
};

export const DealerList = itf({
    payload: itf({
        content: [itf(dealer)]
    })
});

export const DealerSimpleList = itf({
    payload: itf({
        content: [
            itf({
                id: 'string',
                code: 'string',
                name: 'string'
            })
        ]
    })
});

